Skip to main content

mergJSONDecode

Type

function

Summary

The function decodes JSON to an array.

Syntax

mergJSONDecode(<pJSON>, <pVariableName>)

Description

The function decodes JSON to an array.

Parameters

NameTypeDescription

pJSON

string

The UTF8 encoded JSON to decode.

pVariableName

string

The name of the variable to decode the JSON into.

Examples

function JSONToArray pJSON
local tArray,tKeys
repeat for each line tKey in mergJSONDecode(pJSON,"tArray")
put JSONToArray(tArray[tKey]) into tArray[tKey]
end repeat
return tArray
end JSONToArray

Compatibility and Support

Introduced

LiveCode 8.0

OS

ios

android

linux

mac

windows

Platforms

mobile

desktop

server

Thank you for your feedback!

Was this page helpful?